package com.doctcloud.datacloud.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.doctcloud.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

import static com.doctcloud.common.core.utils.StringUtils.trim;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@EqualsAndHashCode(of = {"rcptNo"})
@TableName("outp_rcpt_master")
public class OutpRcptMasterEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Excel(name="就诊时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @NotNull
    private Date visitDate;
    @NotBlank
    private String rcptNo;
    @NotBlank
    private String patientId;
    private String name;
    private String identity;
    private String chargeType;
    private Integer chargeIndicator;
    private Double totalCosts;
    private Double totalCharges;

    public void setName(String name) {
        this.name = trim(name);
    }

    public void setIdentity(String identity) {
        this.identity = trim(identity);
    }

    public void setChargeType(String chargeType) {
        this.chargeType = trim(chargeType);
    }
}
